﻿-var clients = ViewData["clients"] as IList<IClient>
-var clientids = ViewData["clientsids"] as int[]
.field
  %label.inline.required.printbold{for="clients"}Заявители:
  -if (!readOnly)
    .inline
      %a.button{href="#",onclick="return addUser('clients')"} <img src="img/addsmall.gif" /> Еще один заявитель
  %ul#clients.items
    -if (clients != null && clients.Count > 0)
      -foreach(var c in clients)
        %li.client{id=c.Cid}
          -if (!ViewData.ContainsKey("print"))
            %a.noul{href="#", title=(c.IsNotify) ? string.Format("Уведомление: {0}", (!string.IsNullOrEmpty(c.NotifyComment) ? c.NotifyComment : "без текста")) : "", onclick=string.Format("return showUser({0})",c.Cid)}=c.Name
            -if(!readOnly)
              %span.hoverspan
                %a{href="#", onclick=String.Format("return removeUser(this, '{0}')",c.Cid)}
                  %img{src="img/trash.gif"}
          -else
            =c.Name
  -if (!ViewData.ContainsKey("print"))                    
    #addclients
      %ul#addedclients.items
        -if (clients == null || clients.Count == 0)
          %li.empty.details.hidden Нет заявителей  
    %select{multiple="true", class="hidden nolink required", name="clientids", id="clientids"}
      -foreach(IClient c in clients)
        %option{selected="true", value=c.Cid, iscashless=Convert.ToString(c.IsCashless).ToLower(), isnotify=Convert.ToString(c.IsNotify).ToLower(), notifyComment=(!string.IsNullOrEmpty(c.NotifyComment)) ? c.NotifyComment : "без текста"}=c.Name
